
<?
$home=$_GET[home];
$loai=$_GET[loai];

?>
<script language="javascript">
function validate_form(thisform)
{
with (thisform)
{
	
	if (validate_required(txtten,"Bạn chưa nhập tên!")==false)
 	{txtten.focus();return false;}
	
	if (validate_required(parent,"Bạn chưa chọn <?=$titloaitin?>!")==false)
 	{parent.focus();return false;}
	
}
}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="padding:10px">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td   width="6" height="6"><img src="images/j_crn_tl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_t_med.png" width="100%"></td>
            <td  width="6" height="6" ><img src="images/j_crn_tr_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1" background="images/dot.png"></td>
            <td class="bg_title"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><img src="images/icon-48-menumgr.png" width="48" height="48" /></td>
                <td width="45%" class="mana_title"> Thêm <?=$titaddphanloai?></td>
                <td width="50%" align="center">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="75%">&nbsp;</td>
                      <td class="icon_style"><a href="#" onclick="document.getElementById('submit').click()"><img src="images/icon-32-save.png" width="32" height="33"  border="0"/><br />
                      Cập nhật</a></td>
                      <td class="icon_style"><a href="#"><img src="images/icon-32-help.png" width="32" height="32"  border="0"/><br />
                      Tr&#7907; gi&uacute;p</a></td>
                    </tr>
                  </table>
                  </td>
              </tr>
            </table></td>
            <td width="1" background="images/dot.png"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="6" height="6" ><img src="images/j_crn_bl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_b_med.png" width="100%"></td>
            <td width="6" height="6" ><img src="images/j_crn_br_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="7"></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td   width="6" height="6"><img src="images/j_crn_tl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_t_med.png" width="100%"></td>
            <td  width="6" height="6" ><img src="images/j_crn_tr_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1" background="images/dot.png"></td>
            <td bgcolor="#fbfbfb"><form id="frmdanhsach" name="frmdanhsach" method="post" action="index.php?progid=6&baiviet=xuly&loai=<?=$loai?>" onsubmit="return validate_form(this);">
              <table width="100%" border="0" cellspacing="2" cellpadding="2">
                <tr>
                  <td valign="top" style="padding-left:15px; width:64%"><fieldset id="fieldsearch2" runat="server">
                  <legend style="font-size:14px; color: black" title="Search" class="title_field"><span class="title_field">Chi tiết <?=$titaddphanloai?></span></legend>
                  <table width="100%" border="0" cellspacing="3" cellpadding="3">
                      <tr>
                        <td align="right" width="25%" class="bg_form_left">Tên </td>
                        <td class="bg_form_right"> <input name="txtten" type="text" id="txtten" maxlength="150" style="width:250px"  />                        </td>
                      </tr>
                      <?php if($loai==2) { ?>
                      <tr>
                        <td align="right" class="bg_form_left"><?=$titloaitin?></td>
                        <td class="bg_form_right"><?php 
						//echo $loai;
						$strsql="select * from tbloaitin where phanloai_id=$loai  and lang_id='$lang' and loaitin_parent=0 and loaitin_trangthai=1 order by loaitin_id desc";
			 $strAction="";
			$name='parent';?>
                          <select size="1" name=<?php echo $name?>  onchange= <?php echo $strAction?>  >
                            <?php 
			 $qr1=mysql_query($strsql);
			   ?>
                            
                            <option value="" >Cap cao nhat</option>
                            <?php while($row=mysql_fetch_array($qr1))
			{
			?>
                            <option value="<?php echo $row['loaitin_id']?>"><?php echo $row['loaitin_tieude']?></option>
                            <?php
			$bien=$row['loaitin_id'];
			$bienten=$row['loaitin_tieude'];
            caccaptin($bien,$bienten,$selected);
			
		 } ?></select>         </td>
                      </tr>
					   <tr>
					     <td align="right" class="bg_form_left">Tóm tắt <?=$titaddphanloai?></td>
					     <td>  
                         <textarea name="txttomtat" id="txttomtat"  style="width:400px; height:100px"></textarea>
                          </td>
					     </tr>						
                         <?php } ?>
						<tr>
						  <td align="right" class="bg_form_left">Nội dung</td>
						  <td>&nbsp;</td>
						  </tr><tr>
                        <td colspan="2"  class="bg_form_left">
                         <!-- <textarea name="txtnoidung" id="txtnoidung" rows="15" cols="80" style="width: 80%"></textarea>    -->
                        <?php
$oFCKeditor = new FCKeditor('txtnoidung') ;
$oFCKeditor->BasePath	= "../fckeditor/" ;
$oFCKeditor->Value		= '' ;
$oFCKeditor->Create() ;
echo $sBasePath;
?>               </td>
                        </tr>
                         <tr>
                           <td align="right" class="bg_form_left">Title</td>
                           <td align="left" ><textarea name="txttitle" cols="50" rows="4" id="txttitle"></textarea>
                           </td>
                         </tr>
                         <tr>
                           <td align="right" class="bg_form_left">Keyword</td>
                           <td align="left" ><textarea name="txtkeyword" cols="50" rows="4" id="txtkeyword"></textarea></td>
                         </tr>
                         <tr>
                           <td align="right" class="bg_form_left">Desciption</td>
                           <td align="left" ><textarea name="txtdesciption" cols="50" rows="4" id="txtdesciption"></textarea></td>
                         </tr>
                         
                         <tr>
                        <td align="right" class="bg_form_left"><input type="submit" name="submit" id="submit" value="Cập nhật" /></td>
                        <td align="left" >
                          <input type="reset" name="Reset" id="button" value="Nhập lại" />                        </td>
                      </tr>
                    </table>
                  </fieldset></td>
                  <td></td>
                  <td  valign="top" style="padding-right:15px; width:35%"><fieldset id="fieldsearch" runat="server">
                  <legend style="font-size:14px; color: black" title="Search" class="title_field"><span class="title_field">Thông tin tóm tắt</span></legend>
                  <table width="100%" border="0" cellspacing="1" cellpadding="1">
                  <tr>
                    <td><table width="100%" border="0" cellspacing="2" cellpadding="2">
                      <tr>
                        <td width="28%" align="right" class="bg_form_left">Vị trí </td>
                        <td width="72%" align="left">
                        <select name="slvitri" id="slvitri">
                            <option value="0">Chọn vị trí</option>
                            <option value="1">Nổi bật</option>
                            <option value="2">Video (menu trái)</option>
                            </select>
                        
                        </td>
                      </tr>					  
                       <tr>
                         <td align="right" class="bg_form_left">Khóa</td>
                         <td align="left" ><input type="radio" name="txtstatus" id="txtstatus" value="0" />
                           có
                           <input name="txtstatus" type="radio" id="txtstatus" value="1" checked="checked" />
                           không</td>
                       </tr>
                       <tr>
                         <td align="right" class="bg_form_left">Thứ tự</td>
                         <td align="left" ><label>
                           <input type="text" name="txtthutu" id="txtthutu" />
                         </label></td>
                       </tr>
                       <tr>
                         <td align="right" class="bg_form_left">&nbsp;</td>
                         <td align="left" >&nbsp;</td>
                       </tr>
                     
                      
                    </table></td>
                  </tr>
                  
                  <tr>
                    <td>Ảnh minh họa                      </td>
                  </tr>
                  <tr>
                    <td>
                   
                    <input type="text" id="userfile" name="userfile"  value=""  size="10"/>
                    <input type="button" name="button4" id="button3" value="Chọn" onclick="JavaScript:window.open('Select_file.php?Dir=news&form=userfile','_upLoad' ,'height=520,width=650,resizable=no,scrollbars=yes')") />
          <input type="button" name="button3" value="Up file" onclick="JavaScript:window.open('Upfile.php?Dir=news&form=userfile','_upLoad' ,'height=220,width=450,resizable=no,scrollbars=yes')") />
		  <input type="button" name="Button" value="Xoá" onclick="clsText();" />
                    </td>
                  </tr>
               
                 </table>
                  </fieldset>
                 </td>
                </tr>
              </table>
              
                        </form>
            </td>
            <td width="1" background="images/dot.png"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="6" height="6" ><img src="images/j_crn_bl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_b_med.png" width="100%"></td>
            <td width="6" height="6" ><img src="images/j_crn_br_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</td>
  </tr>
</table>
